#!/usr/bin/env bats

@test "static no-around: static (when dynamic is the same as static, nothing happens)" {
  cd $BATS_TEST_DIRNAME
  expected="file1:23:to his commits. This ID allows Gerrit to link together different versions of
file1:57:The output of this command also contains a link to a web page Max can use to
file1:58:review this commit. Clicking on that link takes him to a screen similar to the"
  result="$(fish -c 'tbgs link')"; [ "$result" = "$expected" ]
  result="$(fish -c 'tbgs link around 0')"; [ "$result" = "$expected" ]
  result="$(fish -c 'tbgs around 0 link')"; [ "$result" = "$expected" ]
}

@test "static color: dynamic overwrites static" {
  cd $BATS_TEST_DIRNAME
  expected="file1-21-git clone ssh://gerrithost:29418/RecipeBook.git RecipeBook
file1-22-After he clones the repository, he runs a couple of commands to add a Change-Id
file1:23:to his commits. This ID allows Gerrit to link together different versions of
file1-24-the same change being reviewed.
file1-25-scp -p -P 29418 gerrithost:hooks/commit-msg RecipeBook/.git/hooks/
--
file1-55-HEAD:refs/for/<branch_name>. Gerrit accepts pushes to refs/for/<branch_name>
file1-56-for every branch that it tracks.
file1:57:The output of this command also contains a link to a web page Max can use to
file1:58:review this commit. Clicking on that link takes him to a screen similar to the
file1-59-following."
  result="$(fish -c 'tbgs around 2 link')"; [ "$result" = "$expected" ]
  result="$(fish -c 'tbgs link around 2')"; [ "$result" = "$expected" ]
}
